******************************************
* Log File			 	 *
* "Declared Support and Clientelism" 	 *
* Simeon Nichter and Salvatore Nunnari   *
* Comparative Political Studies      	 *
******************************************

**********************************
* Software: Stata\SE, Version 17 *
**********************************
------------------------------------------------------------------------------------------------------------------------------------------------------------

. *****************************************************************************
. * Figure 1: Declared Support and Perceived Difficulty of Obtaining Benefits *
. *****************************************************************************
. ssc install catplot
checking catplot consistency and verifying not already installed...
all files already exist and are up to date.

. use "Data_Survey_Experiment.dta", clear

. 
. *Applies Labels to Variables
. label define exp_label_1 1 "Declared for Winner" 3 "No Declaration"

. label values exp_condition exp_label_1   

. label define exp_label_2 2 "Very Easy" 3 "Easy" 4 "Hard" 5 "Very Hard"

. label values exp_emp exp_label_2  

. label values exp_med exp_label_2

. label values exp_agua exp_label_2

. 
. *Creates the 3 Subplots in Figure 1 (Combined in Powerpoint)
. catplot exp_med exp_condition if exp_med!=-99 & exp_condition!=2, asyvars stack percent(exp_condition) bar(1, bcolor(gs2))  bar(2, bcolor(gs5)) bar(3, bco
> lor(gs8)) bar(4, bcolor(gs11)) bar(5, bcolor(gs14)) legend(on) title(Medicine) 

. catplot exp_agua exp_condition if exp_agua!=-99 & exp_condition!=2, asyvars stack percent(exp_condition) bar(1, bcolor(gs2)) bar(2, bcolor(gs5)) bar(3, bc
> olor(gs8)) bar(4, bcolor(gs11)) bar(5, bcolor(gs14)) legend(off) title(Water) 

. catplot exp_emp exp_condition if exp_emp!=-99 & exp_condition!=2, asyvars stack percent(exp_condition) bar(1, bcolor(gs2)) bar(2, bcolor(gs5)) bar(3, bcol
> or(gs8)) bar(4, bcolor(gs11)) bar(5, bcolor(gs14)) legend(off) title(Employment) 

. 
. ***********************************************************************************************************************
. * Codebook for Treatments:                                                                                            *                                    
>                                                    									*     
. * T1=NO CLIENTELISM; T2=BASELINE CLIENTELISM; T3=LOPSIDED ELECTION; T4=LOW MONITORING; T5=CLIENTELISM AND PUNISHMENT; *
. * T6=PUNISHMENT ONLY; T7=NO ELECTION INFLUENCE; T8=COMPETITIVE CLIENTELISM; T9=EXPRESSIVE UTILITY; T10=COST           *
. ***********************************************************************************************************************
. 
. **************************************************************
. * Figure 3: Declaration Choice of Participants, by Treatment *
. **************************************************************
. use "Data_Long.dta", clear

. keep if finished_experiment == 1
(11,740 observations deleted)

. bysort pt treatment: egen m_declaremachine=mean(declaremachine)

. bysort pt treatment: egen m_declareopposition=mean(declareopposition)

. bysort pt treatment: egen m_undeclared=mean(undeclared)

. 
. *Applies Treatment Labels to Treatment Variable
. label define treatmentlabel 1 "No Clientelism" 2 "Baseline Clientelism" 3 "Lopsided Election" 4 "Low Monitoring" 5 "Clientelism & Punish" 6 "Punishment On
> ly" 7 "No Election Influence" 8 "Competitive Clientelism" 9 "Expressive Utility" 10 "Cost", replace

. label values treatment treatmentlabel

. 
. label define ptlabel 1 "Strong Supporter" 2 "Supporter" 3 "Weak Supporter" 4 "Indifferent" 5 "Weak Opposer" 6 "Opposer" 7 "Strong Opposer"

. label values pt ptlabel

. 
. *Create and Label Reordered Treatment Variable (For Consistency with Tables) 
. recode treatment (1=2) (2=1) (3=3) (4=5) (5=8) (6=7) (7=10) (8=6) (9=9) (10=4), gen(treatment_graph_reorder)
(10072 differences between treatment and treatment_graph_reorder)

. label define treatmentlabel_reorder 1 "Baseline Clientelism" 2 "No Clientelism" 3 "Lopsided Election" 4 "Cost" 5 "Low Monitoring" 6 "Competitive Clienteli
> sm" 7 "Punishment Only" 8 "Clientelism & Punish" 9 "Expressive Utility" 10 "No Election Influence", replace

. label values treatment_graph_reorder treatmentlabel_reorder 

. 
. *Create Figure 3
. twoway (line m_declaremachine pt, lcolor(blue) lwidth(thick) lpattern(solid)) (line m_declareopposition pt, lcolor(red) lwidth(thick) lpattern(shortdash))
>  (line m_undeclared pt, lcolor(black) lwidth(thick) lpattern(dash_dot)), ytitle(Share of Choices) ytitle(, size(small)) ylabel(#7, labsize(small)) xtitle(
> Partisan Type) xtitle(, size(small)) xscale(line extend fextend) xlabel(1 "1" 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7", labels labsize(small) angle(horizontal)
>  valuelabel ticks) by(, legend(on)) legend(order(1 "Declare for A" 2 "Declare for B" 3 "No Declaration") note(, nobox) size(small) row(1)) by(treatment_gr
> aph_reorder, rows(2) iyaxes ixaxes iytick ixtick iylabel ixlabel iytitle ixtitle) subtitle(, size(small)) scheme(s1mono)

.         
. *********************************************
. * Table 4: Declaration Choices by Treatment *
. *********************************************
. use "Data_Wide.dta", clear

. keep if finished_experiment == 1
(1,174 observations deleted)

. 
. forvalues i=1/10 {
  2. gen t`i'machine = 0 
  3. replace t`i'machine = 1 if t`i'choice == 1
  4. }
(467 real changes made)
(579 real changes made)
(650 real changes made)
(542 real changes made)
(594 real changes made)
(534 real changes made)
(577 real changes made)
(519 real changes made)
(595 real changes made)
(506 real changes made)

. 
. forvalues i=1/10 {
  2. gen t`i'opposition = 0 
  3. replace t`i'opposition = 1 if t`i'choice == 2
  4. }
(426 real changes made)
(384 real changes made)
(345 real changes made)
(407 real changes made)
(393 real changes made)
(391 real changes made)
(371 real changes made)
(487 real changes made)
(430 real changes made)
(444 real changes made)

.  
. forvalues i=1/10 {
  2. gen t`i'undeclared = 0 
  3. replace t`i'undeclared = 1 if t`i'choice == 0
  4. } 
(366 real changes made)
(296 real changes made)
(264 real changes made)
(310 real changes made)
(272 real changes made)
(334 real changes made)
(311 real changes made)
(253 real changes made)
(234 real changes made)
(309 real changes made)

. 
. * Panel A: Declaration for Clientelist Candidate A
. prtest t1machine == t2machine

Two-sample test of proportions             t1machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t1machine |   .3709293   .0136139                      .3442466    .3976121
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |  -.0889595   .0195609                     -.1272982   -.0506207
             |  under H0:   .0196411    -4.53   0.000
------------------------------------------------------------------------------
        diff = prop(t1machine) - prop(t2machine)                  z =  -4.5292
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0000         Pr(|Z| > |z|) = 0.0000          Pr(Z > z) = 1.0000

. prtest t3machine == t2machine

Two-sample test of proportions             t3machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t3machine |   .5162828    .014084                      .4886786    .5438869
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |    .056394    .019891                      .0174083    .0953796
             |  under H0:   .0199227     2.83   0.005
------------------------------------------------------------------------------
        diff = prop(t3machine) - prop(t2machine)                  z =   2.8306
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9977         Pr(|Z| > |z|) = 0.0046          Pr(Z > z) = 0.0023

. prtest t10machine == t2machine

Two-sample test of proportions            t10machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
  t10machine |   .4019063   .0138176                      .3748242    .4289884
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |  -.0579825   .0197033                     -.0966003   -.0193648
             |  under H0:   .0197371    -2.94   0.003
------------------------------------------------------------------------------
        diff = prop(t10machine) - prop(t2machine)                 z =  -2.9377
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0017         Pr(|Z| > |z|) = 0.0033          Pr(Z > z) = 0.9983

. prtest t4machine == t2machine

Two-sample test of proportions             t4machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t4machine |   .4305004   .0139547                      .4031497    .4578511
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |  -.0293884   .0197996                      -.068195    .0094182
             |  under H0:   .0198083    -1.48   0.138
------------------------------------------------------------------------------
        diff = prop(t4machine) - prop(t2machine)                  z =  -1.4836
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0690         Pr(|Z| > |z|) = 0.1379          Pr(Z > z) = 0.9310

. prtest t6machine == t1machine

Two-sample test of proportions             t6machine: Number of obs =     1259
                                           t1machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t6machine |   .4241461   .0139284                       .396847    .4514453
   t1machine |   .3709293   .0136139                      .3442466    .3976121
-------------+----------------------------------------------------------------
        diff |   .0532168   .0194766                      .0150434    .0913903
             |  under H0:   .0195055     2.73   0.006
------------------------------------------------------------------------------
        diff = prop(t6machine) - prop(t1machine)                  z =   2.7283
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9968         Pr(|Z| > |z|) = 0.0064          Pr(Z > z) = 0.0032

. prtest t5machine == t6machine

Two-sample test of proportions             t5machine: Number of obs =     1259
                                           t6machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t5machine |    .471803   .0140691                      .4442281    .4993779
   t6machine |   .4241461   .0139284                       .396847    .4514453
-------------+----------------------------------------------------------------
        diff |   .0476569   .0197974                      .0088546    .0864592
             |  under H0:   .0198202     2.40   0.016
------------------------------------------------------------------------------
        diff = prop(t5machine) - prop(t6machine)                  z =   2.4045
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9919         Pr(|Z| > |z|) = 0.0162          Pr(Z > z) = 0.0081

. prtest t8machine == t2machine

Two-sample test of proportions             t8machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t8machine |   .4122319   .0138727                      .3850419    .4394219
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |  -.0476569   .0197419                     -.0863504   -.0089634
             |  under H0:   .0197648    -2.41   0.016
------------------------------------------------------------------------------
        diff = prop(t8machine) - prop(t2machine)                  z =  -2.4112
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0079         Pr(|Z| > |z|) = 0.0159          Pr(Z > z) = 0.9921

. prtest t9machine == t2machine

Two-sample test of proportions             t9machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t9machine |   .4725973   .0140703                        .44502    .5001746
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |   .0127085   .0198813                     -.0262581    .0516751
             |  under H0:   .0198829     0.64   0.523
------------------------------------------------------------------------------
        diff = prop(t9machine) - prop(t2machine)                  z =   0.6392
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.7386         Pr(|Z| > |z|) = 0.5227          Pr(Z > z) = 0.2614

. prtest t7machine == t2machine

Two-sample test of proportions             t7machine: Number of obs =     1259
                                           t2machine: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
   t7machine |   .4583002   .0140424                      .4307776    .4858228
   t2machine |   .4598888   .0140461                       .432359    .4874186
-------------+----------------------------------------------------------------
        diff |  -.0015886   .0198616                     -.0405165    .0373394
             |  under H0:   .0198616    -0.08   0.936
------------------------------------------------------------------------------
        diff = prop(t7machine) - prop(t2machine)                  z =  -0.0800
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.4681         Pr(|Z| > |z|) = 0.9363          Pr(Z > z) = 0.5319

. 
. * Panel B: Declaration for Opposition Candidate B
. prtest t1opposition == t2opposition

Two-sample test of proportions          t1opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t1opposition |   .3383638   .0133349                      .3122279    .3644996
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |   .0333598   .0186061                     -.0031075    .0698271
             |  under H0:    .018618     1.79   0.073
------------------------------------------------------------------------------
        diff = prop(t1opposition) - prop(t2opposition)            z =   1.7918
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9634         Pr(|Z| > |z|) = 0.0732          Pr(Z > z) = 0.0366

. prtest t3opposition == t2opposition

Two-sample test of proportions          t3opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t3opposition |    .274027   .0125703                      .2493898    .2986643
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |   -.030977    .018066                     -.0663857    .0044317
             |  under H0:   .0180765    -1.71   0.087
------------------------------------------------------------------------------
        diff = prop(t3opposition) - prop(t2opposition)            z =  -1.7137
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0433         Pr(|Z| > |z|) = 0.0866          Pr(Z > z) = 0.9567

. prtest t10opposition == t2opposition

Two-sample test of proportions          t10oppositio: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
       Group |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t10oppositio |   .3526608   .0134658                      .3262684    .3790533
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |   .0476569   .0187002                      .0110052    .0843085
             |  under H0:   .0187243     2.55   0.011
------------------------------------------------------------------------------
        diff = prop(t10oppositio) - prop(t2opposition)            z =   2.5452
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9945         Pr(|Z| > |z|) = 0.0109          Pr(Z > z) = 0.0055

. prtest t4opposition == t2opposition

Two-sample test of proportions          t4opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t4opposition |   .3232724   .0131819                      .2974364    .3491085
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |   .0182685   .0184968                     -.0179846    .0545215
             |  under H0:   .0185004     0.99   0.323
------------------------------------------------------------------------------
        diff = prop(t4opposition) - prop(t2opposition)            z =   0.9875
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.8383         Pr(|Z| > |z|) = 0.3234          Pr(Z > z) = 0.1617

. prtest t6opposition == t1opposition

Two-sample test of proportions          t6opposition: Number of obs =     1259
                                        t1opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t6opposition |   .3105639    .013041                      .2850041    .3361238
t1opposition |   .3383638   .0133349                      .3122279    .3644996
-------------+----------------------------------------------------------------
        diff |  -.0277998   .0186517                     -.0643565    .0087568
             |  under H0:   .0186599    -1.49   0.136
------------------------------------------------------------------------------
        diff = prop(t6opposition) - prop(t1opposition)            z =  -1.4898
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0681         Pr(|Z| > |z|) = 0.1363          Pr(Z > z) = 0.9319

. prtest t5opposition == t6opposition

Two-sample test of proportions          t5opposition: Number of obs =     1259
                                        t6opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t5opposition |   .3121525   .0130592                      .2865569    .3377481
t6opposition |   .3105639    .013041                      .2850041    .3361238
-------------+----------------------------------------------------------------
        diff |   .0015886   .0184556                     -.0345838    .0377609
             |  under H0:   .0184556     0.09   0.931
------------------------------------------------------------------------------
        diff = prop(t5opposition) - prop(t6opposition)            z =   0.0861
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.5343         Pr(|Z| > |z|) = 0.9314          Pr(Z > z) = 0.4657

. prtest t8opposition == t2opposition

Two-sample test of proportions          t8opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t8opposition |   .3868149   .0137257                      .3599131    .4137168
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |    .081811   .0188882                      .0447908    .1188311
             |  under H0:   .0189584     4.32   0.000
------------------------------------------------------------------------------
        diff = prop(t8opposition) - prop(t2opposition)            z =   4.3153
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 1.0000         Pr(|Z| > |z|) = 0.0000          Pr(Z > z) = 0.0000

. prtest t9opposition == t2opposition

Two-sample test of proportions          t9opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t9opposition |   .3415409   .0133651                      .3153457    .3677361
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |   .0365369   .0186278                      .0000271    .0730468
             |  under H0:    .018642     1.96   0.050
------------------------------------------------------------------------------
        diff = prop(t9opposition) - prop(t2opposition)            z =   1.9599
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9750         Pr(|Z| > |z|) = 0.0500          Pr(Z > z) = 0.0250

. prtest t7opposition == t2opposition

Two-sample test of proportions          t7opposition: Number of obs =     1259
                                        t2opposition: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t7opposition |   .2946783   .0128486                      .2694956    .3198611
t2opposition |    .305004   .0129757                      .2795721    .3304359
-------------+----------------------------------------------------------------
        diff |  -.0103257   .0182607                     -.0461161    .0254647
             |  under H0:   .0182619    -0.57   0.572
------------------------------------------------------------------------------
        diff = prop(t7opposition) - prop(t2opposition)            z =  -0.5654
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.2859         Pr(|Z| > |z|) = 0.5718          Pr(Z > z) = 0.7141

. 
. * Panel C: No Declaration
. prtest t1undeclared == t2undeclared

Two-sample test of proportions          t1undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t1undeclared |   .2907069   .0127976                      .2656241    .3157897
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |   .0555997   .0175104                      .0212799    .0899195
             |  under H0:   .0175454     3.17   0.002
------------------------------------------------------------------------------
        diff = prop(t1undeclared) - prop(t2undeclared)            z =   3.1689
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.9992         Pr(|Z| > |z|) = 0.0015          Pr(Z > z) = 0.0008

. prtest t3undeclared == t2undeclared

Two-sample test of proportions          t3undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t3undeclared |   .2096902   .0114729                      .1872037    .2321768
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |   -.025417    .016567                     -.0578877    .0070537
             |  under H0:   .0165747    -1.53   0.125
------------------------------------------------------------------------------
        diff = prop(t3undeclared) - prop(t2undeclared)            z =  -1.5335
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0626         Pr(|Z| > |z|) = 0.1252          Pr(Z > z) = 0.9374

. prtest t10undeclared == t2undeclared

Two-sample test of proportions          t10undeclare: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
       Group |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t10undeclare |   .2454329   .0121284                      .2216617    .2692041
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |   .0103257   .0170275                     -.0230476    .0436989
             |  under H0:   .0170287     0.61   0.544
------------------------------------------------------------------------------
        diff = prop(t10undeclare) - prop(t2undeclared)            z =   0.6064
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.7279         Pr(|Z| > |z|) = 0.5443          Pr(Z > z) = 0.2721

. prtest t4undeclared == t2undeclared

Two-sample test of proportions          t4undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t4undeclared |   .2462272   .0121416                      .2224301    .2700242
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |   .0111199   .0170369                     -.0222717    .0445116
             |  under H0:   .0170383     0.65   0.514
------------------------------------------------------------------------------
        diff = prop(t4undeclared) - prop(t2undeclared)            z =   0.6526
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.7430         Pr(|Z| > |z|) = 0.5140          Pr(Z > z) = 0.2570

. prtest t6undeclared == t1undeclared

Two-sample test of proportions          t6undeclared: Number of obs =     1259
                                        t1undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t6undeclared |   .2652899   .0124424                      .2409032    .2896766
t1undeclared |   .2907069   .0127976                      .2656241    .3157897
-------------+----------------------------------------------------------------
        diff |   -.025417   .0178492                     -.0604007    .0095667
             |  under H0:   .0178563    -1.42   0.155
------------------------------------------------------------------------------
        diff = prop(t6undeclared) - prop(t1undeclared)            z =  -1.4234
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0773         Pr(|Z| > |z|) = 0.1546          Pr(Z > z) = 0.9227

. prtest t5undeclared == t6undeclared

Two-sample test of proportions          t5undeclared: Number of obs =     1259
                                        t6undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t5undeclared |   .2160445   .0115986                      .1933117    .2387773
t6undeclared |   .2652899   .0124424                      .2409032    .2896766
-------------+----------------------------------------------------------------
        diff |  -.0492454     .01701                     -.0825845   -.0159064
             |  under H0:   .0170383    -2.89   0.004
------------------------------------------------------------------------------
        diff = prop(t5undeclared) - prop(t6undeclared)            z =  -2.8903
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0019         Pr(|Z| > |z|) = 0.0038          Pr(Z > z) = 0.9981

. prtest t8undeclared == t2undeclared

Two-sample test of proportions          t8undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t8undeclared |   .2009531   .0112933                      .1788187    .2230876
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |  -.0341541   .0164431                      -.066382   -.0019262
             |  under H0:   .0164572    -2.08   0.038
------------------------------------------------------------------------------
        diff = prop(t8undeclared) - prop(t2undeclared)            z =  -2.0753
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0190         Pr(|Z| > |z|) = 0.0380          Pr(Z > z) = 0.9810

. prtest t9undeclared == t2undeclared

Two-sample test of proportions          t9undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t9undeclared |   .1858618    .010963                      .1643746     .207349
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |  -.0492454   .0162181                     -.0810322   -.0174586
             |  under H0:   .0162477    -3.03   0.002
------------------------------------------------------------------------------
        diff = prop(t9undeclared) - prop(t2undeclared)            z =  -3.0309
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.0012         Pr(|Z| > |z|) = 0.0024          Pr(Z > z) = 0.9988

. prtest t7undeclared == t2undeclared

Two-sample test of proportions          t7undeclared: Number of obs =     1259
                                        t2undeclared: Number of obs =     1259
------------------------------------------------------------------------------
    Variable |       Mean   Std. err.      z    P>|z|     [95% conf. interval]
-------------+----------------------------------------------------------------
t7undeclared |   .2470214   .0121547                      .2231986    .2708443
t2undeclared |   .2351072   .0119514                      .2116828    .2585316
-------------+----------------------------------------------------------------
        diff |   .0119142   .0170463                     -.0214958    .0453243
             |  under H0:   .0170479     0.70   0.485
------------------------------------------------------------------------------
        diff = prop(t7undeclared) - prop(t2undeclared)            z =   0.6989
    H0: diff = 0

    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(Z < z) = 0.7577         Pr(|Z| > |z|) = 0.4846          Pr(Z > z) = 0.2423

. 
. ********************************************************************
. * Table 5: Estimates of Average Treatment Effects, Rewards (Logit) *
. ********************************************************************
. use "Data_Long.dta", clear

. keep if finished_experiment == 1
(11,740 observations deleted)

. set more off

. *net install st0085_2.pkg
. eststo clear

. quietly logit declaremachine ib2.treatment round pt_num screener if treatment!=5 & treatment!=6, robust cluster(id)

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round pt_num screener (asobserved) 1.treatment 3.treatment 4.treatment 9.treatme
> nt 7.treatment 8.treatment 10.treatment round pt_num screener) post 
(est1 stored)

. quietly logit declaremachine ib2.treatment round i.id if treatment!=5 & treatment!=6, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 1.treatment 3.treatment 10.treatment 4.treatment 9.treatment 7.treatment 8.tr
> eatment round) post 
(est2 stored)

. quietly logit declareopposition ib2.treatment round pt_num screener if treatment!=5 & treatment!=6, robust cluster(id)

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round pt_num screener (asobserved) 1.treatment 3.treatment 10.treatment 4.treatm
> ent 9.treatment 7.treatment 8.treatment  round pt_num screener) post 
(est3 stored)

. quietly logit declareopposition ib2.treatment round i.id if treatment!=5 & treatment!=6, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 1.treatment 3.treatment 10.treatment 4.treatment 9.treatment 7.treatment 8.tr
> eatment round) post 
(est4 stored)

. quietly logit undeclared ib2.treatment round pt_num screener if treatment!=5 & treatment!=6, robust cluster(id)

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round pt_num screener (asobserved) 1.treatment 3.treatment 10.treatment 4.treatm
> ent 9.treatment 7.treatment 8.treatment round pt_num screener) post 
(est5 stored)

. quietly logit undeclared ib2.treatment round i.id if treatment!=5 & treatment!=6, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 1.treatment 3.treatment 10.treatment 4.treatment 9.treatment 7.treatment 8.tr
> eatment round) post 
(est6 stored)

. esttab est1 est2 est3 est4 est5 est6, star(* 0.05 ** 0.01) se b(3) margin keep(1.treatment 3.treatment 10.treatment 4.treatment 8.treatment 9.treatment 7.
> treatment round pt_num screener) order(1.treatment 3.treatment 10.treatment 4.treatment 8.treatment 9.treatment 7.treatment round pt_num screener)

------------------------------------------------------------------------------------------------------
                      (1)            (2)            (3)            (4)            (5)            (6)  
                                                                                                      
------------------------------------------------------------------------------------------------------
1.treatment        -0.088**       -0.115**        0.032*         0.044*         0.056**        0.095**
                  (0.017)        (0.020)        (0.015)        (0.020)        (0.015)        (0.023)  

3.treatment         0.058**        0.076**       -0.032*        -0.045*        -0.025         -0.043* 
                  (0.016)        (0.020)        (0.015)        (0.020)        (0.013)        (0.022)  

10.treatment       -0.058**       -0.077**        0.047**        0.066**        0.010          0.018  
                  (0.016)        (0.020)        (0.016)        (0.020)        (0.014)        (0.022)  

4.treatment        -0.027         -0.035          0.016          0.022          0.011          0.019  
                  (0.017)        (0.020)        (0.015)        (0.020)        (0.014)        (0.022)  

8.treatment        -0.046**       -0.061**        0.080**        0.112**       -0.034**       -0.058**
                  (0.016)        (0.020)        (0.016)        (0.021)        (0.013)        (0.021)  

9.treatment         0.013          0.017          0.037*         0.051*        -0.049**       -0.084**
                  (0.016)        (0.020)        (0.015)        (0.021)        (0.013)        (0.021)  

7.treatment        -0.001         -0.001         -0.011         -0.015          0.012          0.020  
                  (0.016)        (0.020)        (0.015)        (0.020)        (0.013)        (0.022)  

round               0.007**        0.010**       -0.007**       -0.011**        0.000          0.001  
                  (0.002)        (0.002)        (0.001)        (0.002)        (0.001)        (0.002)  

pt_num              0.004**                      -0.002**                      -0.002**               
                  (0.000)                       (0.000)                       (0.000)                 

screener            0.013                        -0.025**                       0.012                 
                  (0.010)                       (0.009)                       (0.009)                 
------------------------------------------------------------------------------------------------------
N                   10072           7656          10072           7192          10072           5888  
------------------------------------------------------------------------------------------------------
Marginal effects; Standard errors in parentheses
 (d) for discrete change of dummy variable from 0 to 1
* p<0.05, ** p<0.01

. 
. ****************************************************************************
. * Table 6: Estimates of Average Treatment Effects, Punishment Only (Logit) *
. ****************************************************************************
. eststo clear

. quietly logit declaremachine ib1.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatment!=
> 8 & treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 6.treatment round pt_num screener) post 
(est1 stored)

. quietly logit declaremachine ib1.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatment!=8 & treatme
> nt!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 6.treatment round) post 
(est2 stored)

. quietly logit declareopposition ib1.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatmen
> t!=8 & treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 6.treatment round pt_num screener) post 
(est3 stored)

. quietly logit declareopposition ib1.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatment!=8 & trea
> tment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 6.treatment round) post 
(est4 stored)

. quietly logit undeclared ib1.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatment!=8 & 
> treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 6.treatment round pt_num screener) post 
(est5 stored)

. quietly logit undeclared ib1.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=5 & treatment!=7 & treatment!=8 & treatment!=
> 9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 6.treatment round) post 
(est6 stored)

. esttab est1 est2 est3 est4 est5 est6, star(* 0.05 ** 0.01) se b(3) margin keep(6.treatment round pt_num screener) order(6.treatment round pt_num screener)

------------------------------------------------------------------------------------------------------
                      (1)            (2)            (3)            (4)            (5)            (6)  
                                                                                                      
------------------------------------------------------------------------------------------------------
6.treatment         0.053**        0.152**       -0.027         -0.094**       -0.026         -0.098* 
                  (0.019)        (0.034)        (0.019)        (0.036)        (0.018)        (0.039)  

round               0.007*         0.013         -0.010**       -0.023**        0.003          0.007  
                  (0.003)        (0.008)        (0.003)        (0.008)        (0.003)        (0.009)  

pt_num              0.002**                      -0.002**                      -0.000                 
                  (0.001)                       (0.001)                       (0.000)                 

screener           -0.009                        -0.026*                        0.034**               
                  (0.011)                       (0.011)                       (0.010)                 
------------------------------------------------------------------------------------------------------
N                    2518            862           2518            746           2518            648  
------------------------------------------------------------------------------------------------------
Marginal effects; Standard errors in parentheses
 (d) for discrete change of dummy variable from 0 to 1
* p<0.05, ** p<0.01

. 
. *************************************************************************************
. * Table 7: Estimates of Average Treatment Effects, Clientelism & Punishment (Logit) *                                   
. *************************************************************************************
. eststo clear

. quietly logit declaremachine ib6.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatment!=
> 8 & treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 5.treatment round pt_num screener) post 
(est1 stored)

. quietly logit declaremachine ib6.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatment!=8 & treatme
> nt!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 5.treatment round) post 
(est2 stored)

. quietly logit declareopposition ib6.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatmen
> t!=8 & treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 5.treatment round pt_num screener) post 
(est3 stored)

. quietly logit declareopposition ib6.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatment!=8 & trea
> tment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 5.treatment round) post 
(est4 stored)

. quietly logit undeclared ib6.treatment round pt_num screener if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatment!=8 & 
> treatment!=9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round pt_num screener) at((means) round (asobserved) 5.treatment round pt_num screener) post 
(est5 stored)

. quietly logit undeclared ib6.treatment round i.id if treatment!=2 & treatment!=3 & treatment!=4 & treatment!=1 & treatment!=7 & treatment!=8 & treatment!=
> 9 & treatment!=10, robust

. eststo: quietly margins, dydx(treatment round) at((means) round (asobserved) 5.treatment round) post 
(est6 stored)

. esttab est1 est2 est3 est4 est5 est6, star(* 0.05 ** 0.01) se b(3) margin keep(5.treatment round pt_num screener) order(5.treatment round pt_num screener)

------------------------------------------------------------------------------------------------------
                      (1)            (2)            (3)            (4)            (5)            (6)  
                                                                                                      
------------------------------------------------------------------------------------------------------
5.treatment         0.047*         0.133**        0.002          0.006         -0.049**       -0.198**
                  (0.020)        (0.033)        (0.018)        (0.035)        (0.017)        (0.039)  

round               0.009**        0.036**       -0.009**       -0.039**       -0.001         -0.005  
                  (0.003)        (0.007)        (0.003)        (0.008)        (0.003)        (0.010)  

pt_num              0.004**                      -0.002**                      -0.001**               
                  (0.001)                       (0.000)                       (0.000)                 

screener           -0.005                        -0.025*                        0.029**               
                  (0.011)                       (0.011)                       (0.010)                 
------------------------------------------------------------------------------------------------------
N                    2518            896           2518            780           2518            628  
------------------------------------------------------------------------------------------------------
Marginal effects; Standard errors in parentheses
 (d) for discrete change of dummy variable from 0 to 1
* p<0.05, ** p<0.01

. 
.         
. log close       
------------------------------------------------------------------------------------------------------------------------------------------------------------
